<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>${fileName}</title>
    <style>
        table.GridView {
            margin: 20px;
            font-family: verdana, arial, sans-serif;
            font-size: 11px;
            color: #333333;
            border-width: 1px;
            border-color: #999999;
            border-collapse: collapse;
            width:540px;
            text-align: left;
        }

        table.GridView th {
            background-color: #c3dde0;
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
        }

        table.GridView tr:hover {
            background-color: #ffff66;
        }

        table.GridView td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
        }
    </style>
</head>
<body>
<table class="GridView">
    @var tremarks = "";
    @if(table.remarks!=null && table.remarks!=""){
    @tremarks = " - " + table.remarks;
    @}
    <tr>
        <th colspan="6">表：${table.name} ${tremarks}</th>
    </tr>
    <tr>
        <th scope="col">列名</th>
        <th scope="col">类型</th>
        <th scope="col">备注</th>
        <th scope="col">主键</th>
        <th scope="col">可空</th>
        <th scope="col">默认值</th>
    </tr>
    @for( column in table.baseColumns) {
        @var columnName = column.name;
        @var jdbcTypeName = column.jdbcTypeName;
        @var remarks = column.remarks;
        @var PK = column.pk;
        @var NULL = column.nullable;
        @var defaultValue = column.defaultValue;

        @if(!column.JDBCDateColumn && !column.JDBCTimeColumn) {
            @jdbcTypeName = jdbcTypeName + "(" + column.length;
            @if(column.scale > 0){
                @jdbcTypeName = jdbcTypeName + ","+column.scale;
            @}
            @jdbcTypeName = jdbcTypeName +  ")";
        @}
        <tr>
            <td>${columnName}</td>
            <td>${jdbcTypeName}</td>
            <td>${remarks}</td>
            <td>${PK?"Y":"N"}</td>
            <td>${NULL?"Y":"N"}</td>
            <td>${column.defaultValue}</td>
        </tr>
    @}
</table>
</body>
</html>